﻿<%@ Page Title="" Language="C#" MasterPageFile="~/studentUnion/studentUnion.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.studentUnion.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    .auto-style5 {
        width: 700px;
        border: 5px solid #00FFFF;
    }
    .auto-style6 {
        width: 121px;
    }
        .auto-style7 {
            height: 39px;
        }
    </style>
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="6" border="0" cellspacing="6" class="auto-style5">
    <tr>
        <td class="auto-style6">
        <asp:Label ID="L7" runat="server" Text="删除的序号" ></asp:Label>
        </td>
        <td><asp:TextBox ID="tid" runat="server" Width="125px"></asp:TextBox>
        </td>
        <td colspan="4"><asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click"  CausesValidation="false" Text="删除" />

        </td>
    </tr>
    <tr>
        <td class="auto-style6">

<asp:Label ID="L1" runat="server" Text="检查类型" ></asp:Label>
        </td>
        <td>

<asp:Label ID="L2" runat="server" Text="检查人姓名"></asp:Label>
        </td>
        <td>

<asp:Label ID="L3" runat="server" Text="成绩"></asp:Label>
        </td>
        <td>


<asp:Label ID="L5" runat="server" Text="宿舍号"></asp:Label>
        </td>
        <td>

<asp:Label ID="L6" runat="server" Text="宿舍楼号"></asp:Label>
        </td>
        <td rowspan="2">
<asp:Button ID="btnInsert" runat="server" OnClick="btnInsert_Click" Text="添加" />
        </td>
    </tr>
    <tr>
        <td class="auto-style6">
<asp:TextBox ID="t1" runat="server" Width="58px" style="margin-right:20px"></asp:TextBox>

            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="t1" ErrorMessage="不可为空"></asp:RequiredFieldValidator>

        </td>
        <td>
<asp:TextBox ID="t2" runat="server" Width="77px" style="margin-right:20px" OnTextChanged="t2_TextChanged"></asp:TextBox>

            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="t2" ErrorMessage="不可为空"></asp:RequiredFieldValidator>

        </td>
        <td>
<asp:TextBox ID="t3" runat="server" Width="67px" style="margin-right:20px"></asp:TextBox>


            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="t3" ErrorMessage="不可为空"></asp:RequiredFieldValidator>


        </td>
        <td>
<asp:TextBox ID="t5" runat="server" Width="66px" style="margin-right:20px"></asp:TextBox>

            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="t5" ErrorMessage="不可为空"></asp:RequiredFieldValidator>

        </td>
        <td>
<asp:TextBox ID="t6" runat="server" Width="60px" style="margin-right:20px"></asp:TextBox>

            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="t6" ErrorMessage="不可为空"></asp:RequiredFieldValidator>

        </td>
    </tr>
    <tr>
        <td class="auto-style7">

<asp:Label ID="L8" runat="server" Text="更改的序号" ></asp:Label>
        </td>
        <td class="auto-style7">
<asp:TextBox ID="tupdate" runat="server" Width="108px"></asp:TextBox>

            <br />

        </td>
        <td class="auto-style7">
    <asp:Button ID="bin" runat="server" OnClick="bin_Click" Text="更改" />

        </td>
        <td class="auto-style7"></td>
        <td class="auto-style7"></td>
        <td class="auto-style7"></td>
    </tr>
</table>
<br />
<asp:GridView  ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="id" BorderStyle="Dotted" CellPadding="4" ForeColor="#333333" GridLines="None" Height="100px" Width="100%">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:BoundField DataField="id" HeaderText="序号" SortExpression="id" InsertVisible="False" ReadOnly="True" />
        <asp:BoundField DataField="type" HeaderText="检查类型" SortExpression="type" />
        <asp:BoundField DataField="checker" HeaderText="检查人" SortExpression="checker" />
        <asp:BoundField DataField="score" HeaderText="宿舍成绩" SortExpression="score" />
        <asp:BoundField DataField="date" HeaderText="检查日期" SortExpression="date" />
        <asp:BoundField DataField="hostel" HeaderText="宿舍号" SortExpression="hostel" />
        <asp:BoundField DataField="dormitory" HeaderText="宿舍楼号" SortExpression="dormitory" />
    </Columns>
    <EditRowStyle BackColor="#2461BF" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#EFF3FB" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F5F7FB" />
    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
    <SortedDescendingCellStyle BackColor="#E9EBEF" />
    <SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
&nbsp;
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dmsConnectionString %>" ProviderName="<%$ ConnectionStrings:dmsConnectionString.ProviderName %>" SelectCommand="SELECT * FROM checklist"></asp:SqlDataSource>
<br />
<br />
</asp:Content>
